With a few calls to the Dialog Manager and a resource editor (e.g., ResEdit), you can easily create a simple text entry dialog with a default and a Cancel button. But how easy is it to create an editable, resizable, scrolling text field in a window? Using TextCDEF, you needn't do much more than you would if you were creating an Edit or Static field with your resource editor's dialog editor.

Features of TextCDEF:

• Can handle unlimited amounts of text; no 32K limit
• Lets you lockscreen over list during state changes
• Can be preset to any font or size; or do style runs
• Auto-loads from resource or data fork on startup
• Auto-saves to resource or data fork at close
• Special verb messages sent to this CDEF let you:
     — Find and select by string or word
     — Wrap-around find
     — Cut, copy and paste
     — Resize the field
• Built-in behaviors simplify otherwise tedious
   tasks, including:
     — auto-scrolling during click and drag
     — resetting scroll after resize
     — adjusting scroll after pasting or typing
     — Resizing the field

The field housing the text you're reading right now is an example of the TextCDEF in action. This field is special, though, because it lets you select text, but won't let you enter or delete it by any means.

See ˇ "Var. Codes" for more detail on properties of TextCDEFs.

See ˇ "Make a Control" or ˇ "Events" for specific info on implementing CyberDEFs in your dev environment.